﻿using DFGK_WMS.Model.DTO;
using DFGK_WMS.Model.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.IRepository
{
    public interface ITStocktakingOrderRepository: IBaseRepository<TStocktakingOrder>
    {
        /// <summary>
        /// 导出盘点单号
        /// </summary>
        /// <returns></returns>
        List<TStocktakingOrder> GetStockingExcel();

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        bool AddStocktakingOrder(TStocktakingOrderDto dto,out string message);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        bool UpdateStocktakingOrder(TStocktakingOrderDto dto,out string message);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        bool DelStocktakingOrder(int ids);

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="wid"></param>
        /// <param name="aid"></param>
        /// <param name="name"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<TStocktakingOrder> GetStocktakingOrders(int wid,int aid,string name, int pageIndex, int pageSize, out int totalCount);

        /// <summary>
        /// 条件查询
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        TStocktakingOrderDto GetStocktakingOrder(int ids);

        /// <summary>
        /// 修改状态
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        bool UpdTStocktakingOrderState(ReceivingOrderDetailDto m,out string message);

        /// <summary>
        /// 根据库房库区查询库存表
        /// </summary>
        /// <param name="wid"></param>
        /// <param name="aid"></param>
        /// <param name="name"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<TInventory> GetWhArList(int? wid,int? aid,string name,int pageIndex,int pageSize,out int totalCount);
    }
}
